<link rel="stylesheet" href="../static/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../static/jBox/Skins/Metro/jbox.css" type="text/css">
<link rel="stylesheet" href="../static/dist/css/AdminLTE.min.css" type="text/css">
<link rel="stylesheet" href="../static/css/admin.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/treeTable/jquery.treetable.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/treeTable/jquery.treetable.theme.default.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/datatables/jquery.dataTables.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/daterangepicker/daterangepicker.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/datepicker/datepicker3.css" type="text/css">
<link rel="stylesheet" href="../static/app/goods-keyword/css/bootstrap.min.css" type="text/css" >
<link rel="stylesheet" href="../static/app/goods-keyword/css/jquery.dropdown.css" type="text/css" >
<style>
.ul_tree_display {
	display: none;
}

.tr_tree_display {
	display: none;
}

.layui-layer-content p {
	padding: 15px;
}

.dataTables_length{
    margin-top: 10px;
}
.dataTable>tbody>tr>td{
    vertical-align: middle;
    font-size: 0.8em;
    padding: 8px 18px;
}
.dataTable>thead>tr>th{
    vertical-align: middle;
    font-size: 0.8em;
}
</style>
<div class="tabs-panel">
	<div class="row">
		<div class="col-xs-12">
			<div class="box">
                <div class="box-header">
                    活动标题：
                    <input class="depart-input" name="activity_message_title" id="activity_message_title" type="text" placeholder="" style="width: 150px">&nbsp;
                    <button type="button" class="btn btn-primary depart-modal" onclick="table_list_reload()" style="width: 100px;">查询</button> &nbsp;
                    <button type="button" class="btn btn-warning depart-modal" id="reset_button" style="width: 100px;">重置</button>
                </div>
				<div class="box-body">
					<button type="button" class="btn btn-success depart-modal article-show-btn" style="width: 100px;">添加</button>
					<table id="table_list" class="display">
						<thead>
							<tr>
								<th class="">操作</th>
								<th class="">序号</th>
								<th class="">活动标题</th>
								<th class="">活动时长</th>
								<th class=""><?=TITLE_STATUS?></th>
							</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="activity-message-modal" style="background: rgba(236, 230, 230, 0.3);" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width: 50%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">活动信息</h4>
            </div>
            <div class="modal-body">
                <form action="/activity-message/change-activity-message" method="post" name="activity_message_form" id="activity_message_form">
                    <div class="box-body">
                        <div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>活动标题</label>
                            <input style="width: 50%;" class="form-control" name="activity_title" id="activity_title" placeholder="分类名称" type="text">
                        </div>
                        <div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>活动时间</label>
                            <input class="form-control depart-input" name="reservationtime" id="reservationtime" type="text" placeholder="" style="width: 270px">
                        </div>
                        <div class="form-group">
                        	<div class="form-group" style="width: 50%;float:left">
                                <label for="tag_group_id_add">活动标识</label>
                                <input class="form-control depart-input" name="activity_identification" id="activity_identification" type="text" placeholder="" style="width: 270px">
                            </div>
                            <div class="form-group hide" style="width: 50%;float:left;">
                                <label for="tag_group_id_add">活动标识展示样式</label>
                                <select name="activity_identification_style" id="activity_identification_style" style="width: 50%;"  class="form-control">
                            		<option value="0">请选择</option>
                            		<?php if (is_array($GLOBALS['ACTIVITY_IDENTIFICATION_STYLE']) && count($GLOBALS['ACTIVITY_IDENTIFICATION_STYLE']) > 0)foreach ($GLOBALS['ACTIVITY_IDENTIFICATION_STYLE'] as $style=>$style_name){?>
                            		<option value="<?=$style?>"><?=$style_name?></option>
                            		<?php }?>
                                </select>
                            </div>
                        </div><br/><br/><br><br>
                        <div class="form-group">
                            <label for="tag_group_id_add">活动链接</label>
                            <input class="form-control depart-input" name="activity_url" id="activity_url" type="text" placeholder="" style="width: 270px">
                        </div>
                        <div class="form-group">
                        	<button type="button" class="btn btn-success depart-modal" id="add_input" style="width: 100px;">添加分类</button>
                            <table class="table table-hover" id="input_table">
                            	<thead>
                                    <tr>
                                        <th>分类名称</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody class="tbody-class">
                                </tbody>
                            </table>
                        </div>
                        <div class="form-group">
                        	<button type="button" class="btn btn-success depart-modal" id="add_input_sku" style="width: 100px;">添加商品</button>
                        	&nbsp;&nbsp;&nbsp;<a style="text-decoration:underline;" href="../static/app/activity-message/活动商品导入.xls">模板下载</a>
                        	&nbsp;&nbsp;&nbsp;<a style="text-decoration:underline;" href="javascript:void(0)" class="upload-img-btn">excel导入</a>
                            <table class="table table-hover" id="input_table_sku">
                            	<thead>
                                    <tr>
                                        <th>物料号</th>
                                        <th>商品名称</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody class="tbody-class">
                                </tbody>
                            </table>
                        </div>
                        <div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>状态</label>
                            <select name="use_flg" id="use_flg" style="width: 25%;"  class="form-control">
                            	<option value="1">启用</option>
                            	<option value="0">禁用</option>
                            </select>
                        </div>
                        <input name="activity_message_id" type="hidden" id="activity_message_id">
                    </div>
                </form>
                <div style="display: none">
                    <form id="upload_form_update" action="/activity-message/excel-file-upload" method="post" enctype="multipart/form-data">
                    	<label for="file">Filename:</label>
                    	<input type="file" name="file" id="file" class="upload_file"/> 
                    	<br />
                    	<input type="submit" name="submit" value="Submit" />
                    </form>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <a type="button" class="btn btn-primary ajax_post_tag">提交</a>
            </div>
        </div>
    </div>
</div>
<input name="class_len" id="class_len" value="0" type="hidden"/>
<!-- 固定js -->
<script type="text/javascript" src="/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="/static/jBox/jquery.jBox-2.3.min.js"></script>
<script type="text/javascript" src="/static/jBox/i18n/jquery.jBox-zh-CN.js"></script>
<script type="text/javascript" src="/static/plugins/treeTable/jquery.treetable.js"></script>
<!-- 时间插件 -->
<script type="text/javascript" src="../static/plugins/moment/moment.min.js"></script>
<script type="text/javascript" src="../static/plugins/daterangepicker/daterangepicker.js"></script>
<script type="text/javascript" src="../static/plugins/datepicker/bootstrap-datepicker.js"></script>
<!-- 搜索下拉框插件 -->
<script type="text/javascript" src="../static/app/goods-keyword/js/jquery.dropdown.js"></script>
<script type="text/javascript" src="../static/app/goods-keyword/js/mock.js"></script>
<!-- 文件上传插件 -->
<script type="text/javascript" src="../static/app/activity-message/ajaxfileupload.js"></script>
<!-- 自定义js -->
<script type="text/javascript" src="/static/app/global.js?version=<?=Yii::$app->params['version']?>"></script>
<script type="text/javascript"  src="/static/app/activity-message/index.js?version=<?=Yii::$app->params['version']?>"></script>
<script>
	var category = <?=(is_array($GLOBALS['_GOODS_GENRE_TYPE']) && count($GLOBALS['_GOODS_GENRE_TYPE']) > 0 ? json_encode($GLOBALS['_GOODS_GENRE_TYPE']) : '')?>;
</script>